<template>
  <mars-dialog
    title="站点展示"
    customClass="base-pannel"
    width="330"
    top="100"
    right="15"
    height="40%"
  >
    <div class="info-container">
      <div class="image-container">
        <img :src="areaImage" alt="商水县区域图" class="area-image" />
      </div>
      <div class="intro-container">
        <h3 class="intro-title">{{ stationName }}简介</h3>
        <p class="intro-text">{{ areaIntroduction }}</p>
      </div>
    </div>
  </mars-dialog>
</template>

<script setup lang="ts">
import { ref } from "vue"
import * as mapWork from "../header/map"


const stationName = mapWork.stationName
// 地区图片和简介数据
const areaImage = ref("https://picsum.photos/300/200?random=1") // 示例图片，可替换为实际图片
const areaIntroduction = ref(`
  商水县位于河南省周口市，地处豫东平原，地势平坦，土壤肥沃，是全国粮食生产大县。
`)
</script>

<style lang="less">
// 基础样式重置
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Microsoft YaHei", sans-serif;
}

// 透明对话框样式
.mars-dialog {
  .mars-dialog__content {
    background-color: transparent;
    padding: 0;
  }
}

.transparent-dialog {
  .mars-dialog__header {
    background-color: transparent;
    border-bottom: none;
  }
  .mars-dialog__footer {
    background-color: transparent;
    border-top: none;
  }
}

// 信息容器样式
.info-container {
  width: 100%;
  height: 100%;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

// 图片容器样式
.image-container {
  flex: 0 0 40%;
  margin-bottom: 15px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);

  .area-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

// 简介容器样式
.intro-container {
  flex: 1;
  background-color: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  padding: 15px;
  color: #fff;

  .intro-title {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  }

  .intro-text {
    font-size: 13px;
    line-height: 1.6;
    overflow-y: auto;
    height: 100%;
  }
}

// 对话框头部样式
.mars-dialog .mars-dialog__header {
  background-image: url("/img/panel-header1.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  height: 50px;

  .mars-dialog__title {
    color: #fff;
    margin-left: 15px;
    line-height: 50px;
  }

  .mars-dialog__close {
    color: #fff;
    line-height: 50px;
  }
}
</style>
